]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
viewSelector: Make backspace focus the search entry
authorRui Matos <tiagomatos@gmail.com>
Fri, 7 Aug 2015 12:37:04 +0000 (14:37 +0200)
committerRui Matos <tiagomatos@gmail.com>
Fri, 7 Aug 2015 13:34:34 +0000 (15:34 +0200)
Commit fb0cf64536a35d0d018d2f2bd506a9f02af57b14 regressed this because
there's no unicode character for backspace.

https://bugzilla.gnome.org/show_bug.cgi?id=753319

js/ui/viewSelector.js

index 648f6fa7607c2e2a97c46d096f6f45c470bd58e8..660f619a9e02b718e8b22b6add9dc3d3f05f8bb4 100644 (file)
@@ -465,6 +465,9 @@ const ViewSelector = new Lang.Class({
     },
 
     _shouldTriggerSearch: function(symbol) {
+        if (symbol == Clutter.BackSpace && this._searchActive)
+            return true;
+
         let unicode = Clutter.keysym_to_unicode(symbol);
         if (unicode == 0)
             return false;
@@ -472,7 +475,7 @@ const ViewSelector = new Lang.Class({
         if (getTermsForSearchString(String.fromCharCode(unicode)).length > 0)
             return true;
 
-        return symbol == Clutter.BackSpace && this._searchActive;
+        return false;
     },
 
     startSearch: function(event) {